Page({
  data: {
    message: "提交成功，我们将在1个工作日内通知您",
    status: "success",
    time: 5000
  },
  onLoad(options) {

  },
  onReady() {
    this.toast = this.selectComponent("#toast");
    this.toast1 = this.selectComponent("#toast1");
    this.toast2 = this.selectComponent("#toast2");
  },
  click1() {
    this.setData({
      message: "提交成功，我们将在1个工作日内通知您",
      status: "success",
    })
    this.toast.setShow();
  },
  click2() {
    this.setData({
      message: "提交失败",
      status: "error",
    })
    this.toast.setShow();
  },
  click3() {
    this.setData({
      message: "时间为5秒",
      status: "success",
    })
    this.toast1.setShow();
  },
  click4() {
    this.setData({
      message: "提交成功，我们将在1个工作日内通知您",
      status: "success",
    })
    this.toast2.setShow();
  },
  end(){
    wx.showToast({
      title: '触发回调方法',
    })
  }
})